Dynomotion

Group: DynoMotion Message: 11925 From: vj Cool Date: 7/22/2015
Subject: Raspberry pi 2 KmotionX
hi TK,

I have just tried managed to compile the KMotionX program in my Raspberry pi 2 under PREEMPT RT platform.
As you know RT-Linux does not allow GUI application.
In the KmotionX subfolder which is also named as 'KMotionX', has examples folders. I tried to explore the example folder and under 'other' subfolder i could see some cpp codes.
 My question here is:-

Is it possible for me to write a simple C code which would be able to run a brush DC Servo motor?

If you need more details. i could provide you.

Please advice

thank you
Group: DynoMotion Message: 11926 From: Tom Kerekes Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

I would think so.  You might just send some Console Script Commands to KFLOP.

Does the KFlopConsole Example run and communicate to KFLOP?

Can you enter a script command like "ClearBit47" to tun off an LED on KFLOP?

Regards
TK

Group: DynoMotion Message: 11927 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi Tk,
Thank you for the reply,
yes i could, the command "ClearBit47" did to turn off an LED on KFLOP.

Let me explain to you what i am planning to do.
1) i have a IMU sensor that able to compute a required degree of angle into a textfile.
2) My rpi 2 has RT-Linux installed and i am trying to create a program which would be able to read the textfile and uses the data from the textfile to run the servo motor.

before that i need to set the peak current limit for my DC servo motor.

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

because my motor has the current threshold of 12.5amp.

So how could i create a C program which has the capability to execute all those requirements?




On Wednesday, July 22, 2015 3:42 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I would think so.  You might just send some Console Script Commands to KFLOP.

Does the KFlopConsole Example run and communicate to KFLOP?

Can you enter a script command like "ClearBit47" to tun off an LED on KFLOP?

Regards
TK

Group: DynoMotion Message: 11936 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi Tk,
Thank you for the reply,
yes i could, the command "ClearBit47" did to turn off an LED on KFLOP.

Let me explain to you what i am planning to do.
1) i have a IMU sensor that able to compute a required degree of angle into a textfile.
2) My rpi 2 has RT-Linux installed and i am trying to create a program which would be able to read the textfile and uses the data from the textfile to run the servo motor.

before that i need to set the peak current limit for my DC servo motor.

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

because my motor has the current threshold of 12.5amp.

So how could i create a C program which has the capability to execute all those requirements in KMotionX.
I could run those requirements in my Windows based system but i am not sure how to run a C program in KMotionX in raspberry PI2



On Wednesday, July 22, 2015 3:42 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I would think so.  You might just send some Console Script Commands to KFLOP.

Does the KFlopConsole Example run and communicate to KFLOP?

Can you enter a script command like "ClearBit47" to tun off an LED on KFLOP?

Regards
TK

Group: DynoMotion Message: 11940 From: Tom Kerekes Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

You might just want to use a MS Windows Box to Flash a program to KFLOP's Thread #1 that might initialize all the Axes and enable the Peak Current Limits.  From Linux you could then just execute the Flashed Program by sending a "Execute1" Script command.

You might be able to Compile/Download/Execute the Program from Linux but I'm not sure how well that has been debugged under Linux under your platform.

It is also possible to set the SnapAmp Peak Current commands with FPGA Console Script Commands of:

where XX is the current level for side A and YY is the current level for side B

FPGA 88 XX;FPGA 11 0;FPGA 89 YY;FPGA 11 0

You might then have a C/C++ program in Linux to read your text file and send MoveExp console commands to KFLOP to move your Axis (using KFlopConsole as a Linux base example)

HTH
Regards
TK

 


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Wednesday, July 22, 2015 1:33 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX

 
Hi Tk,
Thank you for the reply,
yes i could, the command "ClearBit47" did to turn off an LED on KFLOP.

Let me explain to you what i am planning to do.
1) i have a IMU sensor that able to compute a required degree of angle into a textfile.
2) My rpi 2 has RT-Linux installed and i am trying to create a program which would be able to read the textfile and uses the data from the textfile to run the servo motor.

before that i need to set the peak current limit for my DC servo motor.

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

because my motor has the current threshold of 12.5amp.

So how could i create a C program which has the capability to execute all those requirements in KMotionX.
I could run those requirements in my Windows based system but i am not sure how to run a C program in KMotionX in raspberry PI2



On Wednesday, July 22, 2015 3:42 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I would think so.  You might just send some Console Script Commands to KFLOP.

Does the KFlopConsole Example run and communicate to KFLOP?

Can you enter a script command like "ClearBit47" to tun off an LED on KFLOP?

Regards
TK

Group: DynoMotion Message: 11942 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

Thank you for the reply.
Sorry i found an example folder under KMotionX 
The example folder could be found in the following directory:-
KMotionX/KMotionX/examples/other/test.cpp

the executable file for test.cpp can be found in the following directory:-
KMotionX/bin 

The executable file for test.cpp is testRunner.
When i execute ./testRunner.

the function testCheckForReady() which runs the command KM->CheckForReady show the output "CheckForReady  succeded"
then there are few warning commands received which followed after KM->CheckForReady

-------------AfxMessageBox: OPTION: DSP_KFLOP.out Date Stamp Doesn't match KFLOP Firmware

Before compiling programs please use Flash/config Screen and select:
Download New Version. This will install compatible Firmware with 
this version of software

KFLOP 4.27 Build 19:07:19 Oct 28 2011 KFLOP Firmware
KFLOP 4.32 Build 20:31:12 Apr 12 2014 DSP_KFLOP.out file----------------------
331792
--------------------------------------------------------------------------------------------------------------------
>OK?

and when the KM->CheckKMotionVersion  it fails

can you help?



On Thursday, July 23, 2015 6:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

You might just want to use a MS Windows Box to Flash a program to KFLOP's Thread #1 that might initialize all the Axes and enable the Peak Current Limits.  From Linux you could then just execute the Flashed Program by sending a "Execute1" Script command.

You might be able to Compile/Download/Execute the Program from Linux but I'm not sure how well that has been debugged under Linux under your platform.

It is also possible to set the SnapAmp Peak Current commands with FPGA Console Script Commands of:

where XX is the current level for side A and YY is the current level for side B

FPGA 88 XX;FPGA 11 0;FPGA 89 YY;FPGA 11 0

You might then have a C/C++ program in Linux to read your text file and send MoveExp console commands to KFLOP to move your Axis (using KFlopConsole as a Linux base example)

HTH
Regards
TK

 


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Wednesday, July 22, 2015 1:33 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX

 
Hi Tk,
Thank you for the reply,
yes i could, the command "ClearBit47" did to turn off an LED on KFLOP.

Let me explain to you what i am planning to do.
1) i have a IMU sensor that able to compute a required degree of angle into a textfile.
2) My rpi 2 has RT-Linux installed and i am trying to create a program which would be able to read the textfile and uses the data from the textfile to run the servo motor.

before that i need to set the peak current limit for my DC servo motor.

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

because my motor has the current threshold of 12.5amp.

So how could i create a C program which has the capability to execute all those requirements in KMotionX.
I could run those requirements in my Windows based system but i am not sure how to run a C program in KMotionX in raspberry PI2



On Wednesday, July 22, 2015 3:42 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I would think so.  You might just send some Console Script Commands to KFLOP.

Does the KFlopConsole Example run and communicate to KFLOP?

Can you enter a script command like "ClearBit47" to tun off an LED on KFLOP?

Regards
TK

Group: DynoMotion Message: 11943 From: Tom Kerekes Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

Looks like you have old Version 4.27 Firmware in your KFLOP.

Using a MS Windows Box Run KMotion Version 4.32 and use the Config/Flash | New Version Button flash it with Firmware Version 4.32 so it matches the Version in Linux.

Regards
TK

Group: DynoMotion Message: 11944 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
hi TK,

O WOW. perfecto. thank you so much!!! Finally i could run KMotionX in raspberry pi 2 using RT-Linux!!!
I am very happy now.

Thank you so much again



On Thursday, July 23, 2015 9:34 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like you have old Version 4.27 Firmware in your KFLOP.

Using a MS Windows Box Run KMotion Version 4.32 and use the Config/Flash | New Version Button flash it with Firmware Version 4.32 so it matches the Version in Linux.

Regards
TK

Group: DynoMotion Message: 11945 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

Is it possible for me to run

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

in a C program?
yes i know in the previous email you advice me to set using MS Windows Box but now i could able to run C program in KMotionX.

Any advice?



On Thursday, July 23, 2015 9:34 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like you have old Version 4.27 Firmware in your KFLOP.

Using a MS Windows Box Run KMotion Version 4.32 and use the Config/Flash | New Version Button flash it with Firmware Version 4.32 so it matches the Version in Linux.

Regards
TK

Group: DynoMotion Message: 11946 From: Tom Kerekes Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

Is the test.cpp program successfully calling:

void testCompile(){
    char file[256];
    strcpy(file,KM->getInstallRoot());
    strcat(file,"/C Programs/FanOFF.c");
    KM->CompileAndLoadCoff(file, 1);
}

??

If so, then it is compiling, downloading, executing the /C Program/FanOFF.c.

Change the filename to a C Program of your own that will enable the SnapAmp. 

There shouls already be one called /C Program/SnapAmp/Set High Cur Limits.c

Regards
TK


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Wednesday, July 22, 2015 7:16 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX

 
Hi TK,

Is it possible for me to run

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

in a C program?
yes i know in the previous email you advice me to set using MS Windows Box but now i could able to run C program in KMotionX.

Any advice?



On Thursday, July 23, 2015 9:34 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like you have old Version 4.27 Firmware in your KFLOP.

Using a MS Windows Box Run KMotion Version 4.32 and use the Config/Flash | New Version Button flash it with Firmware Version 4.32 so it matches the Version in Linux.

Regards
TK

Group: DynoMotion Message: 11947 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

NO...
void testCompile(){
    char file[256];
    strcpy(file,KM->getInstallRoot());
    strcat(file,"/C Programs/FanOFF.c");
    KM->CompileAndLoadCoff(file, 1);
    If(err[0]){
    printf("error %s", err);
    }
}

The output was:- error ?v [?v

Is there anyway to fix the problem?



On Thursday, July 23, 2015 10:42 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Is the test.cpp program successfully calling:

void testCompile(){
    char file[256];
    strcpy(file,KM->getInstallRoot());
    strcat(file,"/C Programs/FanOFF.c");
    KM->CompileAndLoadCoff(file, 1);
}

??

If so, then it is compiling, downloading, executing the /C Program/FanOFF.c.

Change the filename to a C Program of your own that will enable the SnapAmp. 

There shouls already be one called /C Program/SnapAmp/Set High Cur Limits.c

Regards
TK


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Wednesday, July 22, 2015 7:16 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX

 
Hi TK,

Is it possible for me to run

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

in a C program?
yes i know in the previous email you advice me to set using MS Windows Box but now i could able to run C program in KMotionX.

Any advice?



On Thursday, July 23, 2015 9:34 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like you have old Version 4.27 Firmware in your KFLOP.

Using a MS Windows Box Run KMotion Version 4.32 and use the Config/Flash | New Version Button flash it with Firmware Version 4.32 so it matches the Version in Linux.

Regards
TK

Group: DynoMotion Message: 11948 From: vj Cool Date: 7/22/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

please ignore the previous email.

I did some changes to the directory path

void testCompile(){
char file[256];
strcpy(file,KM->getInstallRoot());
strcat(file,"/home/pi/program/git/KMotionX/C\ Programs/current.c");
char err[1024];
//KM->CompileAndLoadCoff(file, 1, err, sizeof(err));
KM->CompileAndLoadCoff(file, 1);
if(err[0])
{
    printf("error %s", err);
}
}

There was no output, meaning no output as error if err[0].

I changed the directory path for the following function too

void testExtractCoffVersion(){
char file[256];
strcpy(file,KM->getInstallRoot());
strcat(file,"/home/pi/program/git/KMotionX/DSP_KFLOP/DSPKFLOP.out");
char Version[81];
if(KM->ExtractCoffVersionString(file, Version)){
printf("ExtractCoffVersionString failed\n");
} else {
printf("CoffVersionString: %s\n",Version);
}
}

There was an output which prints ExtractCoffVersionString failed

any idea in this?



On Thursday, July 23, 2015 10:42 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Is the test.cpp program successfully calling:

void testCompile(){
    char file[256];
    strcpy(file,KM->getInstallRoot());
    strcat(file,"/C Programs/FanOFF.c");
    KM->CompileAndLoadCoff(file, 1);
}

??

If so, then it is compiling, downloading, executing the /C Program/FanOFF.c.

Change the filename to a C Program of your own that will enable the SnapAmp. 

There shouls already be one called /C Program/SnapAmp/Set High Cur Limits.c

Regards
TK


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Wednesday, July 22, 2015 7:16 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX

 
Hi TK,

Is it possible for me to run

WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT0,11);
WriteSnapAmp(SNAP0+SNAP_PEAK_CUR_LIMIT1,11);

in a C program?
yes i know in the previous email you advice me to set using MS Windows Box but now i could able to run C program in KMotionX.

Any advice?



On Thursday, July 23, 2015 9:34 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like you have old Version 4.27 Firmware in your KFLOP.

Using a MS Windows Box Run KMotion Version 4.32 and use the Config/Flash | New Version Button flash it with Firmware Version 4.32 so it matches the Version in Linux.

Regards
TK

Group: DynoMotion Message: 11954 From: Tom Kerekes Date: 7/23/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

Regarding testCompile() the directory path looks all wrong to me.  Maybe try printing it to debug what it is and if it is correct.  Also the err is never used or initialized but is still being tested.  Please use the call that will return errors.

Regarding testExtractCoffVersion I'm not sure if the path is correct either.  Maybe to debug try opening the file for reading to see if it is found.

Regards
TK



Group: DynoMotion Message: 11959 From: vj Cool Date: 7/23/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

O yes you are right.
My Directory path was wrong.
the KM->getInstallRoot() represents the installation path hence the installation path is :- /home/pi/program/git/KMotionX

I have changed the required path at the function
strcat(file,"/C\ Programs/FanOFF.c");
printf("Current file path is: %s\n",file);
In the FanOFF.c file i have change the code to clearbit(47);

the output shows:-
Current file path is : /home/pi/program/git/KMotionX/C Programs/FanOFF.c

unfortunately the FanOFF.c is not working. The LED did not blink off.
and the function 

if(err[0])
{
    printf("error %s\n", err);
}
printed out...

Regarding testExtractCoffVersion, i have changed the path too.

void testExtractCoffVersion(){
char file[256];
strcpy(file,KM->getInstallRoot());
strcat(file,"/DSP_KFLOP/DSPKFLOP.out");
char Version[81];
if(KM->ExtractCoffVersionString(file, Version)){
printf("ExtractCoffVersionString failed\n");
} else {
printf("CoffVersionString: %s\n",Version);
}
}

the output is.

CoffVersionString: KFLOP 4.32 Build 20:31:12 Apr 12 2014

What do you think?


On Friday, July 24, 2015 6:49 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Regarding testCompile() the directory path looks all wrong to me.  Maybe try printing it to debug what it is and if it is correct.  Also the err is never used or initialized but is still being tested.  Please use the call that will return errors.

Regarding testExtractCoffVersion I'm not sure if the path is correct either.  Maybe to debug try opening the file for reading to see if it is found.

Regards
TK



Group: DynoMotion Message: 11964 From: Tom Kerekes Date: 7/24/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11965 From: vj Cool Date: 7/24/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

The error was something like :-  ?v ?

O got no idea what is that



On Saturday, July 25, 2015 9:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11966 From: TK Date: 7/25/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

Looks like garbage instead of a real error message. Are you even passing the Error buffer to the function?  Please post your code. 

Regards
TK

On Jul 24, 2015, at 10:19 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi TK,

The error was something like :-  ?v ?

O got no idea what is that



On Saturday, July 25, 2015 9:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11971 From: vj Cool Date: 7/25/2015
Subject: Re: Raspberry pi 2 KmotionX
Attachments :
Hi TK,

Exactly. i have attached the source file below. You can find the code in the file.



On Sunday, July 26, 2015 1:53 AM, "TK tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like garbage instead of a real error message. Are you even passing the Error buffer to the function?  Please post your code. 

Regards
TK

On Jul 24, 2015, at 10:19 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 
Hi TK,

The error was something like :-  ?v ?

O got no idea what is that



On Saturday, July 25, 2015 9:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11973 From: Tom Kerekes Date: 7/25/2015
Subject: Re: Raspberry pi 2 KmotionX [1 Attachment]
Hi vj Cool,

You are not passing "err" to anything so of course it contains uninitialized garbage.

Regards
TK


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Saturday, July 25, 2015 5:17 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX [1 Attachment]

 
[Attachment(s) from vj Cool included below]
Hi TK,

Exactly. i have attached the source file below. You can find the code in the file.



On Sunday, July 26, 2015 1:53 AM, "TK tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like garbage instead of a real error message. Are you even passing the Error buffer to the function?  Please post your code. 

Regards
TK

On Jul 24, 2015, at 10:19 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 
Hi TK,

The error was something like :-  ?v ?

O got no idea what is that



On Saturday, July 25, 2015 9:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11976 From: vj Cool Date: 7/25/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi TK,

i changed the code KM->CompileAndLoadCoff(file,1);
to
KM->CompileAndLoadCoff(file,1, err, sizeof(err));

Now the error i receive is:-
error sh: 1 tcc67: not found



On Sunday, July 26, 2015 9:48 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

You are not passing "err" to anything so of course it contains uninitialized garbage.

Regards
TK


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Saturday, July 25, 2015 5:17 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX [1 Attachment]

 
[Attachment(s) from vj Cool included below]
Hi TK,

Exactly. i have attached the source file below. You can find the code in the file.



On Sunday, July 26, 2015 1:53 AM, "TK tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like garbage instead of a real error message. Are you even passing the Error buffer to the function?  Please post your code. 

Regards
TK

On Jul 24, 2015, at 10:19 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 
Hi TK,

The error was something like :-  ?v ?

O got no idea what is that



On Saturday, July 25, 2015 9:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11978 From: vj Cool Date: 7/26/2015
Subject: Re: Raspberry pi 2 KmotionX
 
Hi TK,

i changed the code KM->CompileAndLoadCoff(file,1);
to
KM->CompileAndLoadCoff(file,1, err, sizeof(err));

Now the error i receive is:-
error sh: 1 tcc67: not found

another question is.
i have 4 servo DC brush motors
2 motors have Nominal Current of 10A for each
and another
2 motors have Nominal Current of 5.7A for each

How could i set the peak Current?

I know you have mentioned in the website but i am a bit confuse here.
FYi i am using Kflop attached to a Snapamp



On Sunday, July 26, 2015 9:48 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

You are not passing "err" to anything so of course it contains uninitialized garbage.

Regards
TK


From: "vj Cool vjbaskar1986@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
Sent: Saturday, July 25, 2015 5:17 PM
Subject: Re: [DynoMotion] Raspberry pi 2 KmotionX [1 Attachment]

 
[Attachment(s) from vj Cool included below]
Hi TK,

Exactly. i have attached the source file below. You can find the code in the file.



On Sunday, July 26, 2015 1:53 AM, "TK tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

Looks like garbage instead of a real error message. Are you even passing the Error buffer to the function?  Please post your code. 

Regards
TK

On Jul 24, 2015, at 10:19 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 
Hi TK,

The error was something like :-  ?v ?

O got no idea what is that



On Saturday, July 25, 2015 9:54 AM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi vj Cool,

I assume you meant ClearBit(47); as C Functions are case sensitive.

What error message printed out from:

    printf("error %s\n", err);

??

The testExtractCoffVersion seems to be working correctly.

Regards
TK
Group: DynoMotion Message: 11979 From: Tom Kerekes Date: 7/26/2015
Subject: Re: Raspberry pi 2 KmotionX
Hi vj Cool,

That would indicate the compiler TCC67 is not being found.  Although I can't find that error.  Did you type it exactly correct?

Regarding Peak currents: you would need to determine what peak current limit is necessary and reasonable for your motors and requirements.

Regards
TK

Group: DynoMotion Message: 11980 From: Hardy Family Date: 7/26/2015
Subject: Re: Raspberry pi 2 KmotionX

If a command is not being found then try copying the tcc67 binary to /usr/bin etc.  Also make sure your path environment variable is set up correctly to include the kmotion bin directory.  This is Linux, and there's always a workaround for these things.
You also have the source, so poke around in it - the kmotion server directory is where you should look.  Find the code which issues the compile command and see if it looking in the right places for the compiler.  If it's doing something stupid so it can't find the compiler in the bin dir, then tell me and I'll fix it.

Regards,
Sjh

On Jul 26, 2015 12:21 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:
 

Hi vj Cool,

That would indicate the compiler TCC67 is not being found.  Although I can't find that error.  Did you type it exactly correct?

Regarding Peak currents: you would need to determine what peak current limit is necessary and reasonable for your motors and requirements.

Regards
TK